FROM swr.cn-north-1.myhuaweicloud.com/cams-pub/cams-node-runner:ubuntu-22.04-amd64-20240814 as builder
ADD . /opt/app
WORKDIR /opt/app
RUN set -e && npm config set registry https://registry.npmmirror.com && \
    sh build.sh

FROM swr.cn-north-1.myhuaweicloud.com/cams-pub/cams-node-runner:ubuntu-22.04-amd64-20240814
WORKDIR /opt/app-serve
COPY --from=builder /opt/app ./

RUN cp Docker/supervisord/apps.conf  /etc/supervisor/conf.d/apps.conf
RUN chmod +x /opt/app-serve/start.sh
ENTRYPOINT ["/opt/app-serve/start.sh"]
